<script setup lang="ts">
// 创建虚拟DOM 并挂载到真实DOM上
import { h, onMounted, onUnmounted, render } from 'vue'
import XtxMessage from '@/components/message/message.vue'
import Message from '@/components/message'
const VNode = h(XtxMessage, {}, '登录成功')

function handleClick() {
  Message({ type: 'success', text: '登录成功', duration: 1500 })
}

function shibai() {
  Message.error('登陆失败')
}
</script>

<template>
  <div class="box"></div>
  <button @click="handleClick">点击</button>
  <button @click="shibai">失败</button>
</template>

<style scoped></style>
